From: Lars Ingebrigtsen Date: Wed, 19 Jan 2022 18:44:29 +0000 (+0100) Subject: Make article--check-suspicious-addresses more resilient X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~3368 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1476b0d7a61ca5244eed81161c31d794fbd1e571;p=emacs.git Make article--check-suspicious-addresses more resilient * lisp/gnus/gnus-art.el (article--check-suspicious-addresses): Don't bug out on mbox-less addresses. --- diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7611cef3e68..d465dbfd579 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2659,12 +2659,12 @@ If PROMPT (the prefix), prompt for a coding system to use." (defun article--check-suspicious-addresses (addresses) (setq addresses (replace-regexp-in-string "\\`[^:]+:[ \t\n]*" "" addresses)) (dolist (header (mail-header-parse-addresses addresses t)) - (let ((address (car (mail-header-parse-address header)))) - (when-let ((warning (textsec-check address 'email-address))) - (goto-char (point-min)) - (while (search-forward address nil t) - (put-text-property (match-beginning 0) (match-end 0) - 'textsec-suspicious warning)))))) + (when-let* ((address (car (mail-header-parse-address header))) + (warning (textsec-check address 'email-address))) + (goto-char (point-min)) + (while (search-forward address nil t) + (put-text-property (match-beginning 0) (match-end 0) + 'textsec-suspicious warning))))) (defun article-decode-group-name () "Decode group names in Newsgroups, Followup-To and Xref headers."